<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>添加品牌</title>
    <style type="text/css">
		.checkbox{
			 margin-left:5px;
			 width:90px;
			 margin-top: 10px;
		}
		textarea{
			width: 300px;
			height: 100px;
		}
    </style>
    <link rel="stylesheet" type="text/css" href="__STATIC__/Admin/hdjs/hdjs.css"/>
    <script src="__STATIC__/Admin/js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
   <!--上传插件-->
	<script type="text/javascript" charset="utf-8" src="__STATIC__/Admin/uploadify/jquery.uploadify.min.js" ></script>
	<link href="__STATIC__/Admin/uploadify/uploadify.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="wrap">
    <div class="hd-title-header">添加品牌</div>
    <form action="" method="post" class="form-inline hd-form" enctype="multipart/form-data">
        <table class="hd-table hd-table-list">
            <tr>
                <th class="w100">品牌标题</th>
                <td class="w100">
                    <input type="text" name="bname" class="w200"/> 
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">品牌logo</th>
                <td>
					 <div lab="uploadFile">
            			<input id="logo" type="file" multiple="true">
            			<span>类型: *.jpg,*.png 大小: 2000KB 数量: 1</span>
            			<script type="text/javascript">
                		$(function(){
                    		$('#logo').uploadify({
	                        	'formData': {//POST数据
	                            	'<?php echo session_name();?>' : '<?php echo session_id();?>',
	                        	},
		                        'fileTypeDesc' : '上传文件',//上传描述
		                        'fileTypeExts' : '*.jpg;*.png',
		                        'swf'      : '__STATIC__/Admin/uploadify/uploadify.swf',
		                        'uploader' : '{|U:"uploadLogo"}',//上传操作方法
		                        'buttonText':'选择文件',
		                        'fileSizeLimit' : '2000KB',
		                        'uploadLimit' : 100,//上传文件数
		                        'width':65,
		                        'height':25,
		                        'successTimeout':10,//等待服务器响应时间
		                        'removeTimeout' : 0.2,//成功显示时间
		                        'onUploadSuccess' : function(file, data, response) {
		                            data=$.parseJSON(data);
		                            var imageUrl = data.image?data.url:'__STATIC__/Admin/image/default.png';
		                            var li="<li path='"+data.path+"' url='"+data.url+"'><img src='"+imageUrl+"' class='hd-w80 hd-h70'/><a href='javascript:;' style='color: red;' class='del-img close' >X</a><input type='hidden' name='logo' value='"+data.path+"'/></li>";
		                            $("#uploadLogo ul").prepend(li);
                        		}
                    		});
                		});
            			</script>
			            <div id="uploadLogo">
			                <ul>
			 
			                </ul>
			            </div>
	        		</div>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">品牌代表图</th>
                <td>
					<div lab="uploadFile">
            			<input id="showimg" type="file" multiple="true">
            			<span>类型: *.jpg,*.png 大小: 2000KB 数量: 1</span>
            			<script type="text/javascript">
                		$(function(){
                    		$('#showimg').uploadify({
	                        	'formData': {//POST数据
	                            	'<?php echo session_name();?>' : '<?php echo session_id();?>',
	                        	},
		                        'fileTypeDesc' : '上传文件',//上传描述
		                        'fileTypeExts' : '*.jpg;*.png',
		                        'swf'      : '__STATIC__/Admin/uploadify/uploadify.swf',
		                        'uploader' : '{|U:"uploadImg"}',//上传操作方法
		                        'buttonText':'选择文件',
		                        'fileSizeLimit' : '2000KB',
		                        'uploadLimit' : 100,//上传文件数
		                        'width':65,
		                        'height':25,
		                        'successTimeout':10,//等待服务器响应时间
		                        'removeTimeout' : 0.2,//成功显示时间
		                        'onUploadSuccess' : function(file, data, response) {
		                            data=$.parseJSON(data);
		                            var imageUrl = data.image?data.url:'__STATIC__/Admin/image/default.png';
		                            var li="<li path='"+data.path+"' url='"+data.url+"'><img src='"+imageUrl+"' class='hd-w80 hd-h70'/><a href='javascript:;' style='color: red;' class='del-img close' >X</a><input type='hidden' name='showimg' value='"+data.path+"'/></li>";
		                            $("#uploadImg ul").prepend(li);
                        		}
                    		});
                		});
            			</script>
			            <div id="uploadImg">
			                <ul>
			 
			                </ul>
			            </div>
	        		</div>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">品牌排序</th>
                <td class="w100">
                    <input type="text" name="sort" class="w200" value="100"/> 
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">是否热门</th>
                <td>
                	<label class="checkbox-inline">
						<input type="checkbox" value="1" name="ishot" class="check_input">
					</label>
                </td>
                <td></td>
            </tr>        
        </table>
        <div class="position-bottom">
            <input type="submit" class="hd-btn hd-btn-primary hd-btn-sm" value="添加"/>
        </div>
    </form>
</div>
</body>
</html>